package com.jiulan.hearthearing.ui.my.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.jiulan.hearthearing.R;
import com.jiulan.hearthearing.base.BaseActivity;
import com.jiulan.hearthearing.common.MethodUtils;

public class SettingActivity extends BaseActivity implements View.OnClickListener {

    private TextView tvLogout;

    public static void actionStart(Context context) {
        Intent intent = new Intent(context, SettingActivity.class);
        context.startActivity(intent);
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        setAndroidNativeLightStatusBar(true);
    }

    @Override
    protected int setLayoutResourceID() {
        return R.layout.activity_setting;
    }

    @Override
    protected void initView() {
        setTitleText("设置");
        tvLogout = findViewById(R.id.tvLogout);
        tvLogout.setOnClickListener(this);
    }

    @Override
    protected void initData() {

    }

    @Override
    protected int getTitleBarType() {
        return TITLEBAR_DEFAULT;
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.tvLogout:
                MethodUtils.logoutAfter(getContext());
                break;
        }
    }
}
